<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link href="../style/fjol_style.css" rel="stylesheet" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">房价利率</h1>
		</header>
		<div class="mui-content">
		    <ul class="mui-table-view">
		            <li class="mui-table-view-cell">

		                    自定义基准利率
		                    <div class="mui-input-row mui-pull-right p0">

		                        <input type="number" id="fundRate" class="mui-text-right color02b260" placeholder="" value="" style="width: auto; padding: 0; border: none; height: auto; margin: 0;">%
		                    </div>
		                    

		            </li>
		        </ul>
		        
		    <div class="mui-scroll-wrapper" style="top: 110px;">
		    	<p class="mt10">选择贷款利率</p>
		        <div class="mui-scroll">
		            <!--这里放置真实显示的DOM内容-->
		            <ul class="mui-table-view done-rate-list" id="fundRateList">
		                    <li class="mui-table-view-cell" data-rate='0.7'>
		                            7.0折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='0.75'>
		                             7.5折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='0.8'>
		                            8.0折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='0.85'>
		                            8.5折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='0.9'>
		                             9.0折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='0.95'>
		                           9.5折
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='1'>
		                            基准利率
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='1.05'>
		                             1.05倍
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='1.1'>
		                            1.10倍
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='1.15'>
		                            1.15倍
		                    </li>
		                    <li class="mui-table-view-cell" data-rate='1.2'>
		                            1.20倍
		                    </li>
		                </ul>
		        </div>
		    </div>
		    
		</div>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			var loanRate;
			mui.plusReady(function() {
                var wv = plus.webview.currentWebview();
                loanRate = wv.loanRate;
                document.querySelector('#fundRate').value = loanRate*100;
//        		console.log(loanRate);
            });
            
            mui('#fundRateList').on('tap','li',function(){
            	var dataRate = this.getAttribute('data-rate');
            	var dataValue = this.innerHTML;
            	document.querySelector('#fundRate').value = (loanRate*dataRate*100).toFixed(2);
//          	console.log(dataValue);
            	var parentPage = plus.webview.getWebviewById('fj_mortgage');
            	mui.fire(parentPage,'getFundRate',{
            		dataRate: (loanRate*dataRate*100).toFixed(2),
            		dataValue:dataValue
            	});
            	mui.back();
            });
		</script>
	</body>

</html>